local NewGame = GS:addState('NewGame')
function NewGame:enterState()
	clearLoveCallbacks()
	print("entering new game state")
	player.lock_control = true
	

	reset_vars()
	local select_input = "name"
	local name = ""
	local gender = ""
	local character_created = false

	function love.draw()
		love.graphics.print("press c to generate character : ",
			64, 96)
		if character_created then
			love.graphics.print("your character:\n" .. "gender: " .. player.gender .. "\n"
				.. "name: " .. player.full_name .. "\n\npress enter to continue")
		end

		draw_mouse()
	end

	function love.update(dt)
		global_updates(dt)
	end

	function love.keypressed(key, unicode)

		p_control(key, unicode)
		
		if key == 'c' then

			
			player.gender = NG:random_gender()

			if player.gender == "m" then player.image = man_img
			elseif player.gender =="f" then player.image = woman_img end
			
			player.first_name = NG:get_first_name(player.gender)
			player.last_name = NG:get_last_name()

			player.full_name = player.first_name .. " " .. player.last_name

			print("fn : ", player.name, "ln: ", player.last_name, "g: ", player.gender)
			character_created = true
			
		end

		if character_created and key == 'return' then
			new_game = false
			gs:gotoState('MedBay')
		end
	end
end

function NewGame:exitState()
	print("exiting new game state")
	player.lock_control = false
	player.last_state = 'NewGame'
	
end
